package com.maixy.studyonlineapi.constants;


import com.maixy.studyonlineapi.bean.State;

/**
 * @Description 全局常量
 * @Date 2020/7/26 22:17
 * @Created by maixy
 */
public class GlobalConstant {
    /**
     * 单位是秒
     */
    public static class Times {
        public static final long TEN_MINUTES = 60 * 10;
        public static final long HALF_AN_HOUR = 60 * 30;
        public static final long AN_HOUR = 60 * 60 * 1000;
        public static final long THREE_HOUR = 3 * 60 * 60;
        public static final long TWELVE_HOUR = 12 * 60 * 60;
        public static final long ONE_DAY = 24 * 60 * 60;
        public static final long THREE_DAY = 3 * 24 * 60 * 60;
        public static final long ONE_YEAR = 365 * 24 * 60 * 60;
    }

    public static class Strings {
        public static final String TEST = "测试";
    }

    public static class StateCode {
        public static final State SUCCESS = new State(2000, "请求成功");
        public static final State FAILURE = new State(5001, "请求失败，请联系管理员");
        public static final State API_EXCEPTION = new State(5002, "api异常");
        public static final State TOKEN_EXCEPTION = new State(5003, "登录失效，请重新登录");
        public static final State TIP_EXCEPTION = new State(5004, "未知异常");
        public static final State NOT_EXIST_EXCEPTION = new State(5005, "此对象被删除或不存在");
        public static final State MISS_PARAM_EXCEPTION = new State(5006, "参数缺失");
        public static final State PARAM_EXCEPTION = new State(5007, "参数异常");
    }
}
